YZYZ.Admin.Route.enableConfirm = function(routeId){
	Ext.MessageBox.show({
		title:'确认',
		msg:'您确定要激活此行程吗？',
		buttons:Ext.MessageBox.OKCANCEL,
		fn:function(btn){YZYZ.Admin.Route.enableHandle(btn,routeId);}
	})
};
YZYZ.Admin.Route.enableHandle = function(btn, routeId){
	Ext.Ajax.request( {
		url		: Ext.get("enableRouteUrl").dom.value,
		timeout	: 30000,
		method	: 'POST',
		params	: {
			routeId 	:  routeId
		},
		success : function(result, request) {
			result = Ext.util.JSON.decode(result.responseText);
			if(result.code == YZYZ.success){
				YZYZ.Curtain.msg("激活成功");
				YZYZ.Admin.Route.grid.getSelectionModel().getSelected().set("available",true);
				YZYZ.Admin.Route.grid.getStore().commitChanges();
			}
			else {
				YZYZ.Curtain.alert(result.message);
				flag = false;
			}
		},
		failure : function(result, request) {
			YZYZ.Curtain.alert("操作失败！程序错误或网络故障");
			flag = false;
		}
	});
};